#include <stdio.h>
void main()
{
    
    int a,a1=0,i,n,sum=0;
    
    scanf("%d %d",&a,&n);
    for(i=1;i<=n;i++)
    {
        a1=a1*10+a;
        sum=sum+a1;
    }
    printf("sum=%d\n",sum);
    
}